--
-- PostgreSQL database dump
--

-- Started on 2009-11-07 14:06:38

SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;

--
-- TOC entry 310 (class 2612 OID 16386)
-- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: postgres
--

CREATE PROCEDURAL LANGUAGE plpgsql;


ALTER PROCEDURAL LANGUAGE plpgsql OWNER TO postgres;

SET search_path = public, pg_catalog;

SET default_tablespace = '';

SET default_with_oids = false;

--
-- TOC entry 1500 (class 1259 OID 16430)
-- Dependencies: 3
-- Name: sentence; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE sentence (
    id integer NOT NULL,
    monitor_id integer NOT NULL,
    content text,
    type character varying(255)
);


ALTER TABLE public.sentence OWNER TO postgres;

--
-- TOC entry 1499 (class 1259 OID 16428)
-- Dependencies: 1500 3
-- Name: discovery_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE discovery_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public.discovery_id_seq OWNER TO postgres;

--
-- TOC entry 1790 (class 0 OID 0)
-- Dependencies: 1499
-- Name: discovery_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE discovery_id_seq OWNED BY sentence.id;


--
-- TOC entry 1498 (class 1259 OID 16414)
-- Dependencies: 3
-- Name: monitors; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE monitors (
    id integer NOT NULL,
    url character varying(1023) NOT NULL,
    status character varying(1023) NOT NULL
);


ALTER TABLE public.monitors OWNER TO postgres;

--
-- TOC entry 1497 (class 1259 OID 16412)
-- Dependencies: 1498 3
-- Name: monitors_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE monitors_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public.monitors_id_seq OWNER TO postgres;

--
-- TOC entry 1791 (class 0 OID 0)
-- Dependencies: 1497
-- Name: monitors_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE monitors_id_seq OWNED BY monitors.id;


--
-- TOC entry 1778 (class 2604 OID 16417)
-- Dependencies: 1497 1498 1498
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE monitors ALTER COLUMN id SET DEFAULT nextval('monitors_id_seq'::regclass);


--
-- TOC entry 1779 (class 2604 OID 16433)
-- Dependencies: 1499 1500 1500
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE sentence ALTER COLUMN id SET DEFAULT nextval('discovery_id_seq'::regclass);


--
-- TOC entry 1783 (class 2606 OID 16438)
-- Dependencies: 1500 1500
-- Name: pk_discovery; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sentence
    ADD CONSTRAINT pk_discovery PRIMARY KEY (id);


--
-- TOC entry 1781 (class 2606 OID 16422)
-- Dependencies: 1498 1498
-- Name: pk_monitors; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY monitors
    ADD CONSTRAINT pk_monitors PRIMARY KEY (id);


--
-- TOC entry 1784 (class 2606 OID 16439)
-- Dependencies: 1498 1780 1500
-- Name: fk_monitors; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sentence
    ADD CONSTRAINT fk_monitors FOREIGN KEY (monitor_id) REFERENCES monitors(id);


--
-- TOC entry 1789 (class 0 OID 0)
-- Dependencies: 3
-- Name: public; Type: ACL; Schema: -; Owner: postgres
--

REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM postgres;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO PUBLIC;


-- Completed on 2009-11-07 14:06:38

--
-- PostgreSQL database dump complete
--

